import { POWER_CODE } from "@/common/power";
import { getButtonPower } from "@/components/PowerButton";
import { TUseMaterialPriceQueryPage } from "@/gcfx_web/defaultConfig/config";
import { useGlobalContent } from "@/store";

// 材价应用相关页面配置
const useMaterialPriceQueryPage: TUseMaterialPriceQueryPage = () => {
  const { global } = useGlobalContent();

  return {
    // 综合材价库-操作权限
    comMaterPriceOperatePower: getButtonPower(POWER_CODE.comMaterPrice_operate, global),
    // 价表材价库-操作权限
    materPriceListOperatePower: getButtonPower(POWER_CODE.materPriceList_operate, global),
    // 信息价-回收站权限
    infoPriceRecycleBinPower: getButtonPower(POWER_CODE.materInfoPrice_recycleBin, global),
    // 信息价-操作权限
    infoPriceOperatePower: getButtonPower(POWER_CODE.materInfoPrice_operate, global),
  };
};

export default useMaterialPriceQueryPage;
